/*
 * StringUtils.h
 *
 *  Created on: Mar 24, 2011
 *      Author: kimi
 */

#ifndef STRINGUTILS_H_
#define STRINGUTILS_H_

#include <string>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>

using namespace std;


/*
 *
 */
class StringUtils {
public:
	StringUtils();
	virtual ~StringUtils();
	void trim(string& str);
	string toLower(string s);
	virtual string toString(unsigned int i);
	virtual string toString(unsigned long i);
	virtual string toString(double d);

	virtual unsigned int toInt(string value);
	virtual unsigned long toLong(string value);

	string replaceAllOccurences(string word, string old, string withStr);

	vector<string> split(string l, char delim);

	unsigned long stringKeyToULongKey(string key);
};

#endif /* STRINGUTILS_H_ */
